/**
 * author: abid.hussain
 */
exports.GAOffersModel = Core.Class.subclass({
	classname : 'GAOffersModel',
	initialize : function (){
		this.offersId = 0;
		this.user_id = null;
		this.user_level = null;
		this.currency = null;
		this.currency_name = null;
		this.fire_type = null;
		this.offer_id = null;
		this.i_tx_id = null;
		this.i_price_tier = null;
		this.ts = null;
		this.is_error = "0";
		this.state = "";
	},
	setUserId : function (id){
		this.user_id = id;
	},
	setUserLevel : function (level){
		this.user_level = level;
	},
	setCurrency : function (curr){
		this.currency = curr;
	},
	setCurrencyName : function (name){
		this.currency_name = name;
	},
	setFireType : function (type){
		this.fire_type = type;
	},
	setOfferId : function (id){
		this.offer_id = id;
	},
	setITxId : function (id){
		this.i_tx_id = id;
	},
	setIPriceTier : function (priceTier){
		this.i_price_tier = priceTier;
	},
	setTs : function (ts){
		this.ts = ts;
	},
	setIsError : function (error){
		this.is_error = error;
	},
	
	getUserId : function (){
		return this.user_id;
	},
	getUserLevel : function (){
		return this.user_level;
	},
	getCurrency : function (){
		return this.currency;
	},
	getCurrencyName : function (){
		return this.currency_name;
	},
	getFireType : function (){
		return this.fire_type;
	},
	getOfferId : function (){
		return this.offer_id;
	},
	getITxId : function (){
		return this.i_tx_id;
	},
	getIPriceTier : function (){
		return this.i_price_tier;
	},
	getTs : function (){
		return this.ts;
	},
	toJSON: function() {
		var obj = {};
		for (var i in this) {
			if (i != "state") {
				obj[i] = this[i];
			}
		}
		return obj;
	},
	destroy: function(){
		this.offersId = null;
		this.user_id = null;
		this.user_level = null;
		this.currency = null;
		this.currency_name = null;
		this.fire_type = null;
		this.offer_id = null;
		this.i_tx_id = null;
		this.i_price_tier = null;
		this.ts = null;
		this.is_error =null;
		this.state =null;
	}
});